package com.htsk.city.services.wechat.controller;


import com.htsk.city.services.core.entity.R;
import com.htsk.city.services.wechat.service.FileService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RestController
@RequestMapping("file")
public class FileController {
    @Resource
    private FileService fileService;

    /**
     * 文件上传
     * @param file
     * @return
     */
    @PostMapping("upload")
    public R<String> uploadFile(MultipartFile file){
        return fileService.uploadFile(file);
    }

}
